#include <stdio.h>
#include <string.h>
int main()
{
	char str[1024];
	char ch = 0;
	gets(str);
	ch = str[0];
	gets(str);
	int len = strlen(str); 
	int count = 0;
	for ( int i = 0; i < len; i++ ) {
		if ( str[i] == ch ) {
			count ++;
		}
	}
	float percent = (float)count / len;
	printf("%.2f%%", percent * 100);
	return 0;
}
